package com.atguigu.gulimall.order;

import java.text.SimpleDateFormat;
import java.util.Date;

public class df {
    public static void main(String[] args) {
        Integer f1 = 100, f2 = 100, f3 = 150, f4 = 150;
        String[] str = new String[]{"123","456"};
        String str2 = "abcdefgfijklmn;";
        String str3 = new String("123");
        System.out.println(str2.hashCode());
        System.out.println(str3.hashCode());
        String str4 = reverse(str2);
        System.out.println(str4);
        SimpleDateFormat oldFormatter = new SimpleDateFormat("yyyy/MM/dd");
        Date date1 = new Date();
        System.out.println(oldFormatter.format(date1));
//        str2.length();
//        System.out.println(str.length);
//        System.out.println(f1 == f2);
//        System.out.println(f3 == f4);
    }
    public static String reverse(String originStr) {
        if(originStr == null || originStr.length() <= 1)
            return originStr;
        System.out.println("originStr.substring(1):" + originStr.substring(1) + " : " + "originStr.charAt(0):"+originStr.charAt(0));
        return reverse(originStr.substring(1)) + originStr.charAt(0);
    }
}
class Annoyance extends Exception {}
class Sneeze extends Annoyance {}

class Human {

    public static void main(String[] args)
            throws Exception {
        try {
            try {
                throw new Sneeze();
            }
            catch ( Annoyance a ) {
                System.out.println("Caught Annoyance");
                throw a;
            }
        }
        catch ( Sneeze s ) {
            System.out.println("Caught Sneeze");
            return ;
        }
        finally {
            System.out.println("Hello World!");
        }
    }
}
